NULL and Undefined in JavaScriptBoth null and undefined represent the absence of a value in JavaScript, but they are different in purpose and use.
NullExample:
let value = null;
console.log(value);
Output: null
UndefinedExample:
let value;
console.log(value);
Output: undefined